package com.lmm.lcuser.lc_user.plugins;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.WritableMap;
import com.lmm.dresswisdom.lmmframe.reactnative.BasePlugin;
import com.lmm.dresswisdom.lmmframe.reactnative.annotation.RNPlugin;
import com.lmm.lcuser.lc_user.MainActivity;

import java.util.Map;

/**
 * @author xmgong
 * @date 2017/11/28
 */
@RNPlugin(method = "checkcity")
public class CheckCityPlugin extends BasePlugin<MainActivity> {
    public CheckCityPlugin(MainActivity act) {
        super(act);
    }

    @Override
    protected void doAction(Map<String, Object> paramsMap, Callback callback) {
        WritableMap writableMap = Arguments.createMap();
        writableMap.putBoolean("needreload", false);
        writableMap.putString("citycode", "001013002");
        writableMap.putString("cityname", "常熟");
        callback.invoke(writableMap);
    }
}
